:root {
  --bg1: #061423;
  --bg2: #081d33;

  --card: rgba(255, 255, 255, .08);
  --card2: rgba(255, 255, 255, .12);
  --stroke: rgba(255, 255, 255, .14);

  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .68);

  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
  --radius: 22px;

  --ok: rgba(90, 200, 255, .95);
  --okBg: rgba(90, 200, 255, .16);
  --okStroke: rgba(90, 200, 255, .28);

  --focus: rgba(120, 210, 255, .40);
}

* {
  box-sizing: border-box;
  font-family: "Montserrat Alternates", sans-serif;
  font-style: normal;
}

html {
  height: 100%;
}


body {
  background: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);

  background:
    radial-gradient(900px 600px at 20% 10%, rgba(70, 170, 255, .26), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(140, 220, 255, .16), transparent 55%),
    radial-gradient(900px 700px at 50% 85%, rgba(0, 150, 255, .12), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));

  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  overscroll-behavior: none;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .08;
  mix-blend-mode: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="3" stitchTiles="stitch"/></filter><rect width="240" height="240" filter="url(%23n)" opacity="0.45"/></svg>');
  background-size: 240px 240px;
}

.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10vh;
  left: 0;
  opacity: .65;
  filter: drop-shadow(0 0 10px rgba(180, 240, 255, .35));
  font-size: 18px;
  transform: translateZ(0);
  animation-name: snow-fall, snow-sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  will-change: transform, top, left;
}

@keyframes snow-fall {
  to {
    top: 110vh;
  }
}

@keyframes snow-sway {
  0% {
    transform: translateX(-10px);
  }

  50% {
    transform: translateX(18px);
  }

  100% {
    transform: translateX(-8px);
  }
}

.snowflake:nth-child(1) {
  left: 4%;
  font-size: 14px;
  opacity: .45;
  animation-duration: 12s, 4.2s;
  animation-delay: -2s, -1s;
}

.snowflake:nth-child(2) {
  left: 10%;
  font-size: 20px;
  opacity: .70;
  animation-duration: 16s, 5.2s;
  animation-delay: -8s, -3s;
}

.snowflake:nth-child(3) {
  left: 16%;
  font-size: 16px;
  opacity: .55;
  animation-duration: 13s, 4.6s;
  animation-delay: -6s, -2s;
}

.snowflake:nth-child(4) {
  left: 22%;
  font-size: 22px;
  opacity: .75;
  animation-duration: 18s, 6.0s;
  animation-delay: -10s, -1s;
}

.snowflake:nth-child(5) {
  left: 28%;
  font-size: 15px;
  opacity: .50;
  animation-duration: 14s, 4.1s;
  animation-delay: -5s, -2s;
}

.snowflake:nth-child(6) {
  left: 34%;
  font-size: 19px;
  opacity: .68;
  animation-duration: 17s, 5.7s;
  animation-delay: -12s, -4s;
}

.snowflake:nth-child(7) {
  left: 40%;
  font-size: 24px;
  opacity: .80;
  animation-duration: 20s, 6.4s;
  animation-delay: -9s, -2s;
}

.snowflake:nth-child(8) {
  left: 46%;
  font-size: 16px;
  opacity: .55;
  animation-duration: 13.5s, 4.9s;
  animation-delay: -3s, -1s;
}

.snowflake:nth-child(9) {
  left: 52%;
  font-size: 18px;
  opacity: .62;
  animation-duration: 15.5s, 5.0s;
  animation-delay: -7s, -3s;
}

.snowflake:nth-child(10) {
  left: 58%;
  font-size: 14px;
  opacity: .48;
  animation-duration: 12.8s, 4.0s;
  animation-delay: -11s, -2s;
}

.snowflake:nth-child(11) {
  left: 64%;
  font-size: 23px;
  opacity: .78;
  animation-duration: 19s, 6.2s;
  animation-delay: -4s, -1s;
}

.snowflake:nth-child(12) {
  left: 70%;
  font-size: 17px;
  opacity: .60;
  animation-duration: 15s, 5.4s;
  animation-delay: -13s, -4s;
}

.snowflake:nth-child(13) {
  left: 76%;
  font-size: 21px;
  opacity: .72;
  animation-duration: 18.5s, 6.1s;
  animation-delay: -6s, -2s;
}

.snowflake:nth-child(14) {
  left: 82%;
  font-size: 15px;
  opacity: .52;
  animation-duration: 13.8s, 4.3s;
  animation-delay: -9s, -3s;
}

.snowflake:nth-child(15) {
  left: 88%;
  font-size: 26px;
  opacity: .82;
  animation-duration: 21s, 6.7s;
  animation-delay: -14s, -1s;
}

.snowflake:nth-child(16) {
  left: 94%;
  font-size: 16px;
  opacity: .58;
  animation-duration: 14.2s, 4.8s;
  animation-delay: -2s, -2s;
}

.snowflake:nth-child(17) {
  left: 6%;
  font-size: 12px;
  opacity: .40;
  animation-duration: 11.5s, 3.9s;
  animation-delay: -9s, -2s;
}

.snowflake:nth-child(18) {
  left: 38%;
  font-size: 13px;
  opacity: .44;
  animation-duration: 12.2s, 4.1s;
  animation-delay: -5s, -3s;
}

.snowflake:nth-child(19) {
  left: 62%;
  font-size: 12px;
  opacity: .42;
  animation-duration: 11.8s, 3.8s;
  animation-delay: -7s, -1s;
}

.snowflake:nth-child(20) {
  left: 86%;
  font-size: 13px;
  opacity: .46;
  animation-duration: 12.6s, 4.0s;
  animation-delay: -3s, -2s;
}

.wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}

.card {
  width: min(760px, 100%);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .06));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(600px 240px at 10% 0%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(520px 240px at 90% 10%, rgba(255, 255, 255, .10), transparent 60%),
    radial-gradient(520px 260px at 50% 100%, rgba(255, 255, 255, .10), transparent 60%);
  opacity: .85;
  pointer-events: none;
}

header {
  padding: 28px 26px 8px;
  position: relative;
}

h1 {
  font-size: clamp(22px, 3.2vw, 30px);
  margin: 0;
  letter-spacing: .2px;
  line-height: 1.1;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 60ch;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  margin: 14px 0 0;
}

main {
  padding: 18px 18px 22px;
  position: relative;
}

@media (max-width:560px) {
  header {
    padding: 24px 18px 8px;
  }
}

.centered-header {
  text-align: center;
  padding: 40px 20px 20px;
}

.centered-header h1 {
  font-size: clamp(38px, 6vw, 64px);
  margin-bottom: 10px;
}

.centered-header .subtitle {
  font-size: 18px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hw-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  padding: 18px 34px;
  border-radius: 999px;

  font-size: 18px;
  font-weight: 600;
  letter-spacing: .2px;

  color: rgba(210, 240, 255, .95);
  text-decoration: none;

  background: linear-gradient(180deg, rgba(90, 200, 255, .28), rgba(90, 200, 255, .12));
  border: 1px solid rgba(120, 210, 255, .35);

  box-shadow:
    0 0 0 1px rgba(120, 210, 255, .10) inset,
    0 8px 24px rgba(0, 120, 255, .25);

  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.hw-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(160, 230, 255, .6);
  box-shadow:
    0 0 0 1px rgba(120, 210, 255, .25) inset,
    0 12px 32px rgba(0, 140, 255, .35);
}

.hw-btn:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(120, 210, 255, .35) inset,
    0 6px 18px rgba(0, 140, 255, .3);
}

.no-copy {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  pointer-events: auto;
}

.btn-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(140, 220, 255, .5));
}

.section {
  margin-top: 18px;
  padding: 14px 14px 4px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .10);
}

.section-title {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: .2px;
}

.section-text {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(220, 245, 255, .92);
  background: rgba(90, 200, 255, .10);
  border: 1px solid rgba(120, 210, 255, .22);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 10px;
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.mini-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  padding: 14px 14px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
}

.mini-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(90, 200, 255, .12);
  border: 1px solid rgba(120, 210, 255, .22);
  color: rgba(220, 245, 255, .92);
}

.mini-muted {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.mini-title {
  margin: 0 0 6px;
  font-size: 15px;
}

.mini-text {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .70);
  font-size: 13px;
  line-height: 1.45;
}

.mini-actions {
  display: flex;
  justify-content: flex-end;
}

.mini-link {
  font-size: 13px;
  text-decoration: none;
  color: rgba(210, 240, 255, .9);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
}

.skills {
  display: grid;
  gap: 12px;
  padding-bottom: 10px;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(90, 200, 255, .55), rgba(170, 240, 255, .30));
  box-shadow: 0 0 20px rgba(90, 200, 255, .25);
}

.footer {
  margin-top: 16px;
  padding: 6px 6px 0;
  text-align: center;
}

.footer-text {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
}

/* ===== Mobile polish (phones) ===== */
:root {
  /* чуть мягче радиус/тени на телефонах */
  --radius-mobile: 18px;
}

/* чтобы не было "прыжков" из-за 100vh в мобильных браузерах */
body {
  min-height: 100dvh;
}

/* на iOS fixed-фон часто лагает — отключаем на тач-устройствах */
@media (hover: none) and (pointer: coarse) {
  body {
    background-attachment: scroll;
  }
}

/* Safe areas (iPhone notch) + компактнее отступы */
.wrap {
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(14px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(14px + env(safe-area-inset-left));
  align-items: flex-start; /* чтобы контент начинался сверху, а не центрировался */
}

/* Карточка: чуть меньше радиус/поля, чтобы влезало на 360-390px */
@media (max-width: 560px) {
  .card {
    border-radius: var(--radius-mobile);
  }

  header.centered-header {
    padding: 26px 14px 14px;
  }

  main {
    padding: 14px 12px 16px;
  }

  .section {
    margin-top: 14px;
    padding: 12px 12px 6px;
    border-radius: 16px;
  }

  .pill {
    font-size: 12px;
    padding: 7px 10px;
  }

  /* чтобы "пилюли" не раздували строки */
  .kpi {
    gap: 8px;
  }
}

/* Очень узкие экраны (320–390px) */
@media (max-width: 420px) {
  .centered-header h1 {
    font-size: clamp(28px, 8vw, 42px);
  }

  .centered-header .subtitle {
    font-size: 15px;
  }

  .hero-topline .place {
    font-size: 16px;
  }

  .hero-topline .muted {
    font-size: 12px;
  }

  .hero .hero-temp {
    font-size: 40px; /* было 46 на 560px — на 360px всё равно тесно */
  }

  .hero-right {
    min-width: 0;
  }

  .hero-condition {
    font-size: 18px;
  }

  .hero-feels {
    font-size: 15px;
  }

  /* длинные строки (ветер/порывы) лучше переносить красиво */
  .pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }

  /* секции и шапки прогнозов */
  .section-head {
    padding: 12px 12px;
    border-radius: 14px;
    margin: 14px 0 10px;
  }

  .mini-card {
    padding: 12px 12px 10px;
    border-radius: 16px;
  }
}

/* Улучшаем "тапы" */
@media (hover: none) and (pointer: coarse) {
  .mini-link,
  .hw-btn,
  button {
    min-height: 44px; /* Apple HIG */
  }
}

/* Чуть уменьшаем визуальный шум на слабых телефонах */
@media (max-width: 420px) {
  .noise { opacity: .06; }
  .snowflake { opacity: .45; font-size: 16px; }
}

/* FIX: белый экран при скролле на телефонах (iOS/Android) */
html, body {
  background-color: #061423; /* фолбэк вместо белого */
  min-height: 100%;
}

body {
  /* на мобилках fixed фон часто ломает рендер при скролле */
  background-attachment: scroll !important;
}

/* чтобы фон точно тянулся на всю высоту документа */
body {
  min-height: 100dvh;
}
